﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AISFMIOperator
{
    public partial class ProvSpecialtyForm : Form
    {
        public ProvSpecialtyForm()
        {
            InitializeComponent();
            RefreshSpecialties();
        }

        private void RefreshSpecialties()
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = Specialty.GetAllSpecialties();
            dataGridView1.Columns[0].DataPropertyName = "SpecialtyID";
            dataGridView1.Columns[1].DataPropertyName = "SpecialtyName";
            dataGridView1.Columns[2].DataPropertyName = "Description"; 
          
        }

        private void ProvSpecialtyForm_Load(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {
            AddSpecialtyForm ass = new AddSpecialtyForm();
            ass.ShowDialog();
            RefreshSpecialties();
        }
    }
}
